package cn.shop.msgs;

import cn.shop.utils.enums.OrderStatus;

import java.time.LocalDateTime;

/**
 * @author : 李一涵
 * @date : Created in 2021-12-17 14:21
 * @description :
 */
public class SoldOutMsg extends BaseMsg {
    public final static String TOPIC = "shop-topic-soldOut";
    public final static String TAG = "soldOut";
    public final static String DESTINATION = TOPIC + ":" + TAG;

    private OrderStatus status;

    public OrderStatus getStatus() {
        return status;
    }

    public void setStatus(OrderStatus status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return super.toString() + "OrderMsg{" +
                "status=" + status +
                '}';
    }

    public static SoldOutMsg start(){
        return new SoldOutMsg();
    }

    public SoldOutMsg status(OrderStatus status) {
        this.status = status;
        return this;
    }

    @Override
    public SoldOutMsg id(long... id) {
        super.id(id);
        return this;
    }

    @Override
    public SoldOutMsg time(LocalDateTime time) {
        super.time(time);
        return this;
    }
}
